home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / plaf / basic / BasicTreeUI$TreeToggleAction.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  1.3 KB  |  33 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.event.ActionEvent;
  4. import javax.swing.AbstractAction;
  5. import javax.swing.tree.TreePath;
  6.  
  7. public class BasicTreeUI$TreeToggleAction extends AbstractAction {
  8.    // $FF: synthetic field
  9.    private final BasicTreeUI this$0;
  10.  
  11.    public BasicTreeUI$TreeToggleAction(BasicTreeUI var1, String var2) {
  12.       this.this$0 = var1;
  13.    }
  14.  
  15.    public void actionPerformed(ActionEvent var1) {
  16.       if (this.this$0.tree != null) {
  17.          int var2 = BasicTreeUI.access$5(this.this$0);
  18.          if (var2 != -1 && !this.this$0.isLeaf(var2)) {
  19.             TreePath var3 = BasicTreeUI.access$9(this.this$0);
  20.             TreePath var4 = BasicTreeUI.access$4(this.this$0);
  21.             this.this$0.toggleExpandState(this.this$0.getPathForRow(this.this$0.tree, var2));
  22.             BasicTreeUI.access$2(this.this$0, var3);
  23.             BasicTreeUI.access$3(this.this$0, var4);
  24.          }
  25.       }
  26.  
  27.    }
  28.  
  29.    public boolean isEnabled() {
  30.       return this.this$0.tree != null && this.this$0.tree.isEnabled();
  31.    }
  32. }
  33.